home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 168 / 168.d81 / precess sat (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  4KB  |  110 lines

  1. 5 poke55,0:poke56,56
  2. 10 dv=peek(186):ifdv<8thendv=8
  3. 15 poke53371,0
  4. 20 poke53272,31
  5. 25 ad=49152
  6. 30 sysad:sysad+12
  7. 35 dimgm(9),j2(9),r(9)
  8. 36 gosub185
  9. 37 bs$="[159][164][157][164][157][164][157][164][157][164][157][164][157][164][157][164][157][164][157][164][157][164][157][164][157][164][157][164][157][164][157][164][157][164][157][164][157][164][157][164][157][164][157][164]"
  10. 40 print"[147]":poke53280,.:poke53281,.:sysad+9,13
  11. 41 print"[159][220][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][221]"
  12. 42 printbs$""tab(38)bs$
  13. 43 print"[159][255][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][162][161]"
  14. 44 tq=ti
  15. 45 print"";tab(6)"[150] [208][210][197][195][197][211][211][201][207][206] [207][198] [193] [211][193][212][197][204][204][201][212][197] "
  16. 55 printtab(8)"[153] [208]ick a [200]eavenly [194][207][196][217]: "
  17. 60 printtab(3)"0. [158][205]ercury  3. [158][205]oon    6. [158][211]aturn"
  18. 65 printtab(3)"1. [158][214]enus    4. [158][205]ars    7. [158][213]ranus"
  19. 70 printtab(3)"2. [158][197]arth    5. [158][202]upiter 8. [158][206]eptune"
  20. 72 printtab(9)"9. [153][211]atellite listings"
  21. 75 geta$:ifa$<"0"ora$>"9"then75
  22. 80 j=val(a$)
  23. 83 ifj=9thengoto270
  24. 85 sysad+9,6
  25. 90 printtab(2)"[153][193]ltitude of its orbit: ";:l9%=8:gosub1250:a=q9
  26. 95 printtab(2)"[153][201]nclination to equator ([219]s): ";:l9%=4:gosub1250:i=q9
  27. 100 i=i/rd:rem convert to radians
  28. 105 poke214,10:print:printtab(8)"[201]s this [195]orrect? [150][217]/[206]":poke198,0
  29. 106 gethc$:ifhc$<>"y"andhc$<>"n"then106
  30. 107 ifhc$="n"thengoto40
  31. 110 k1=r(j)*r(j)*(r(j)+a)^-3.5*sqr(gm(j))
  32. 115 n=-1.5*k1*j2(j)*cos(i)
  33. 120 p=.75*k1*j2(j)*(5*cos(i)*cos(i)-1)
  34. 125 n=n*rd*s:p=p*rd*s:rem radians/sec to deg/day
  35. 130 sysad+9,14
  36. 132 poke214,10:print:printtab(1)"[150][162][162][162][162][162][162][162][162][162][162][162][155][212]he [210][197][211][213][204][212][211][160]are[150][162][162][162][162][162][162][162][162][162][162][162]"
  37. 135 print:printtab(6)"[155]-[153][208]recession of the [206][207][196][197][155]-"
  38. 140 printtab(6)"";n;"[158][219]s per day"
  39. 145 printtab(6)"";n*y;"[158][219]s per year"
  40. 150 print:printtab(5)"[155]-[153][208]recession of [208][197][210][201][195][197][206][212][197][210][155]-"
  41. 155 printtab(6)"";p;"[158][219]s per day "
  42. 160 printtab(6)"";p*y;"[158][219]s per year"
  43. 162 ifti<tq+500then162
  44. 165 gosub40000
  45. 175 restore:poke198,.:goto40
  46. 185 rem    read in data
  47. 190 rd=180/(NULL):rem radians to degrees
  48. 195 y=365.2422:rem days per year
  49. 200 s=86400:rem seconds per day
  50. 205 forj=0to8:readgm(j):next
  51. 210 rem planetary gm's (km^3/s^2)
  52. 215 data22032,324860,398600,4902,42828
  53. 220 data125680000,37931000,5793900,6835000
  54. 225 forj=0to8:readj2(j):next
  55. 230 rem planetary j2's
  56. 235 data.00006,.0000186,.001083,.0002027
  57. 240 data.00196,.014736,.016480,.003345,.0043
  58. 245 forj=0to8:readr(j):next
  59. 250 rem planetary radii (km)
  60. 255 data2440,6050,6378,1738,3398
  61. 260 data71492,60268,25559,24760
  62. 265 return
  63. 270 print"[147]":sysad+9,12
  64. 275 print"[211]atellite   [200]eight(km) [201]nclination [219]'s"
  65. 280 print"[155][197]-[153][205]oon     [158]   384,400   [159]18.3-28.6"
  66. 285 print"[155][197]-[153][195][207][194][197]     [158]       890   [159]   99"
  67. 290 print"[155][197]-[153][205]ir      [158]       414   [159]   51.6"
  68. 295 print"[155][205]-[153][208]hobos   [158]     5,380   [159]    1"
  69. 300 print"[155][202]-[153][201]o       [158]   421,600   [159]     .04"
  70. 305 print"[155][202]-[153][197]uropa   [158]   670,900   [159]     .47"
  71. 307 print"[155][202]-[153][199]anymede [158] 1,070,000   [159]     .19"
  72. 310 print"[155][202]-[153][195]allisto [158] 1,883,000   [159]     .28"
  73. 315 print"[155][202]-[153][195]arme    [158]22,600,000   [159]  163"
  74. 320 print"[155][211]-[153][205]imas    [158]   185,520   [159]     .942"
  75. 325 print"[155][211]-[153][196]ione    [158]   377,400   [159]     .02"
  76. 327 print"[155][211]-[153][197]nceladus[158]   238,020   [159]     .02"
  77. 330 print"[155][211]-[153][212]itan    [158] 1,221,850   [159]     .33"
  78. 332 print"[155][211]-[153][208]hoebe   [158]12,952,850   [159]     .13"
  79. 333 print"[155][211]-[153][210]hea     [158]   527,040   [159]     .35"
  80. 335 print"[155][213]-[153][205]iranda  [158]   129,780   [159]    3.4"
  81. 337 print"[155][213]-[153][212]itania  [158]   435,840   [159]    0"
  82. 340 print"[155][213]-[153][213]mbriel  [158]   265,970   [159]    0"
  83. 342 print"[155][213]-[153][207]beron   [158]   582,600   [159]    0"
  84. 345 print"[155][206]-[153][212]riton   [158]   354,800   [159]  157"
  85. 350 print"[155][206]-[153][206]ereid   [158] 5,513,400   [159]   29"
  86. 355 printtab(10)"[150][193]ny key for [215]ork [211]creen":poke198,0
  87. 360 gethc$:ifhc$=""then360
  88. 365 goto40
  89. 1250 q9$="":poke198,.
  90. 1255 geta$
  91. 1260 poke646,rnd(1)*15+1:print"*[157]";:ifa$=""then1255
  92. 1265 ifa$=chr$(13)thenprint" ":q9=val(q9$):return
  93. 1270 if(a$=chr$(20)andlen(q9$))thenq9$=left$(q9$,len(q9$)-1):goto1300
  94. 1275 iflen(q9$)>=l9%thensysad+9,2:goto1255
  95. 1280 if(a$>="0"anda$<="9")ora$="."ora$="-"then1290
  96. 1285 goto1255
  97. 1290 q9$=q9$+a$
  98. 1295 print""a$;:sysad+9,6:goto1255
  99. 1300 print" [157][157] [157]";:goto1255
  100. 10000 d=peek(186):n$="precess sat":open15,d,15,"s0:"+n$:close15:saven$,d:end
  101. 40000 poke214,20:print:printtab(8)"[155](1[155]) [154][212]ry another one
  102. 40010 [153][163]8)"list(2list) cont(NULL)o (NULL)(NULL)right$(NULL)val(NULL)(NULL)val (NULL)enu
  103. 40020 poke198,0:sysad+9,15
  104. 40030 geta$:ifa$<"1"ora$>"2"then40030
  105. 40040 ifa$="1"thenreturn
  106. 40050 sysad+15
  107. 40060 print"[147][144]load"chr$(34)"b.universe ii"chr$(34)","dv
  108. 40070 print"run28"
  109. 40080 poke631,13:poke632,13:poke198,2:end
  110.